#include <linux/module.h>
#include <linux/platform_device.h>
#include "plt_data.h"

static struct resource plt_res[] = {
	[0]	= {
		.start	= 2,
		.end	= 3,
		.flags	= IORESOURCE_IO,
	},
	[1]	= {
		.start	= 4,
		.end	= 5,
		.flags	= IORESOURCE_MEM,
	},
	[2]	= {
		.start	= 6,
		.end	= 7,
		.flags	= IORESOURCE_IRQ,
	},
};

static void plt_dev_release(struct device *dev)
{

}

static struct plt_plat_data plt_data = {
	.num	= 959,
	.size	= 0xffff,
};

static struct platform_device plt_dev = {
	.name		= "plt",
	.id		= -1,
	.resource	= plt_res,
	.num_resources	= ARRAY_SIZE(plt_res),
	.dev		= {
		.release	= plt_dev_release,
		.platform_data	= &plt_data,
	},
};

static int __init plt_init(void)
{
	return platform_device_register(&plt_dev);
}

static void __exit plt_exit(void)
{
	platform_device_unregister(&plt_dev);
}

module_init(plt_init);
module_exit(plt_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("YYW");

